//
//  XTOperationView.swift
//  XTMuteOpen
//
//  Created by bushAK on 2024/1/23.
//

import UIKit

class XTOperationView: UIView {

    override   func awakeFromNib() {
        super.awakeFromNib()
        backgroundColor = .clear
        frame = CGRect(x: 0, y: UIScreen.main.bounds.size.height,
                       width:  UIScreen.main.bounds.size.width,
                       height:  UIScreen.main.bounds.size.height)
         UIView.animate(withDuration: 0.25) {
             self.frame = CGRect(x: 0, y: 0, 
                                 width:  UIScreen.main.bounds.size.width,
                                 height: UIScreen.main.bounds.size.height)
         } completion: { anim in
             self.backgroundColor = UIColor.black.withAlphaComponent(0.4)
         }
        


    }
  

    @objc  class func operationView() -> XTOperationView{
        return Bundle.main.loadNibNamed("XTOperationView", owner: self, options: nil)![0] as! XTOperationView
 
       }
    
    
    @objc func showView()  {
         self.isHidden = false
         UIView.animate(withDuration: 0.25) {
             self.frame = CGRect(x: 0, y: 0, width:  UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height)

         } completion: { anim in
            
             self.backgroundColor = UIColor.black.withAlphaComponent(0.4)
         }
     }
    
    @objc func hideView()  {
        backgroundColor = .clear
        UIView.animate(withDuration: 0.25) {
            self.frame = CGRect(x: 0, y: UIScreen.main.bounds.size.height, width:  UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height)

        } completion: { anim in
            self.isHidden = true
        }
    }
    
    
    @IBAction func closeCltck(_ sender: Any) {
        
    }
    
    @IBAction func ballclick(_ sender: Any) {
        
    }
    
    @IBAction func taskclick(_ sender: Any) {
        
    }
    
    @IBAction func homeClick(_ sender: Any) {
        
    }
    
    
    @IBAction func changeNameClick(_ sender: Any) {
        
    }
    
    
    @IBAction func taskClick(_ sender: Any) {
        
    }
    
    @IBAction func restartClick(_ sender: Any) {
        
    }
    
    
    @IBAction func extiClick(_ sender: Any) {
        
    }
     
    
}
